[LINUX] PV-on-HVM: Only initialize the owner field of struct
authorIan Campbell <ian.campbell@xensource.com>
Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)
committerIan Campbell <ian.campbell@xensource.com>
Wed, 25 Oct 2006 12:58:30 +0000 (13:58 +0100)
device_driver on kernels from 2.6.10 onward. The field was not
available until then.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c

index 987cdfcd110620e96993de05ee619755779ccd63..287e316d1478140e5e32b4096c114b44ec801541 100644 (file)
@@ -331,7 +331,9 @@ int xenbus_register_driver_common(struct xenbus_driver *drv,
 
        drv->driver.name = drv->name;
        drv->driver.bus = &bus->bus;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
        drv->driver.owner = drv->owner;
+#endif
 
        mutex_lock(&xenwatch_mutex);
        ret = driver_register(&drv->driver);